<template>
  <div>
        <div>
            <!-- list组件 -->
            <listExample :listData="list" :type="listType"></listExample>
        </div>
        <!-- <div class="button">
            <span @click="load('pre')">上一页</span>
            <span @click="load('next')">下一页</span>
        </div> -->
        <div class="load" v-show="isLoad">
            正在加载数据...
        </div>
        <!-- 数据仅供参考提示，hosName通过接口获得，在该组件赋值传给子组件，首页不需要传值，默认为空 -->
        <tips :hosName="hosName"></tips>
        <!-- 水印 -->
        <div class="watermark"></div>
  </div>
</template>

<script>
import tips from '@/components/tips.vue'
import listExample from '@/components/list.vue'
import { getLISReportListApi} from '@/api/healthRecords'
export default {
    name: 'JYBG',
    data () {
        return {
            list:[

            ],  //就诊报告
            hispitalList:[], //医院列表
            selected:'',
            resourceId:'',
            startDate:'2018-01-01',
            endDate:'2018-12-12',
            privewLink:'',
            nextLink:'',
            selfLink:'',
            isLoad:false,
            curPage:1,
            total:null,
            listType:'jybg',
            zjhmParamter: JSON.parse(localStorage.getItem('zjhm')),
            hosName:''//医院名称
        }
    },
    watch:{

    },
    methods:{
        getLISReportList() {
            getLISReportListApi(JSON.stringify(this.zjhmParamter)).then(response => {
                if (response.data.code == 1) {
                    this.list = response.data.data;
                }
            })

        }
    },
    components:{
        listExample,tips
    },
    created(){
        this.getLISReportList()
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
    select{
        background: #E7F7FC;
        color:#333;
        margin-top:1rem;
        border:none;
        width: 18rem;
        padding:0.5rem;
    }
    .find{
        top:7.5rem
    }
    .null{
        line-height: 6rem;
        background: #fff;
        text-align: center;
    }
    .dateBtn{
        width: 10.5rem;
    }
    .load{
        text-align: center;
        line-height: 4rem;
    }
    .times-select{padding: 1rem;color: #999;background-color: #fff;position: relative;}
    .icon-tip1{background: url('../../assets/images/yygl-blue.png') no-repeat;background-size: 100% 100%;width: 2rem;height: 2rem;
    position: absolute;left: 1rem;top: 1rem;}
    .times-select-top{line-height: 2rem;padding-left: 2rem;margin-bottom: 0.5rem;}
    .dateBtn{background-color: #E7F7FC;border: 0;color: #000;padding: 0.5rem;vertical-align: baseline;}
    .find{background-color: #fff;border: 1px solid #2BBAF5;color: #2BBAF5;
    width: 5rem;right: 2rem;position: absolute;line-height: 2rem;}
    .report-list {color: #919191;}
    .reportList-li {width: 100%;overflow: hidden;background-color: #fff;margin-bottom: 0.6rem;}
    .reportList-li>p {padding: 0.4rem 1.5rem;position: relative;}
    .reportList-li-bottom:after {content: ' ';position: absolute;height: 1px;
        width: 100%;bottom: 0;background-color: #ddd;left: 0;}
    .reportList-li-right {color: #fff;border-radius: 0.2rem;background-color: #9CCC65;
        padding: 0.4rem 0.8rem;position: absolute;right: 1.5rem;top: 0;text-overflow: ellipsis;
        overflow: hidden;width: 10rem;word-break: break-word;white-space: nowrap;}
    .subject {margin-right: 1rem;}
    .report-list-bottom{line-height: 3rem;}
    .type{color: #000;}
    .icon{display: block;}
    .icon-arrow-right{width: 1rem;height: 1.5rem;background: url('../../assets/images/arrow-right.png') no-repeat;
    background-size: 100% 100%;position: absolute;right: 1rem;top: 50%;transform: translateY(-50%);}
    .hosName{font-size: 1.6rem;color: #000;}
</style>
